﻿using System;
using System.Collections.Generic;
using System.Text;

namespace XAJH
{
    /// <summary>
    /// 人物类
    /// </summary>
    public class Character
    {
        #region 属性

        private int hp_X_Start;
        /// <summary>
        /// 获取血条开始位置
        /// </summary>
        public int Hp_X_Start
        {
            get { return hp_X_Start; }
            set { hp_X_Start = value; }
        }

        private int hp_X_End;
        /// <summary>
        /// 获取血条结束位置
        /// </summary>
        public int Hp_X_End
        {
            get { return hp_X_End; }
            set { hp_X_End = value; }
        }

        private int hp_Mp_Y;
        /// <summary>
        /// 获取或设置血蓝 Y 坐标
        /// </summary>
        public int Hp_Mp_Y
        {
            get { return hp_Mp_Y; }
            set { hp_Mp_Y = value; }
        }

        private int mp_X_Start;
        /// <summary>
        /// 获取或设置蓝开始位置
        /// </summary>
        public int Mp_X_Start
        {
            get { return mp_X_Start; }
            set { mp_X_Start = value; }
        }

        private int mp_X_End;
        /// <summary>
        /// 获取或设置蓝结束位置
        /// </summary>
        public int Mp_X_End
        {
            get { return mp_X_End; }
            set { mp_X_End = value; }
        }

        private IntPtr handle;
        /// <summary>
        /// 获取或设置窗口柄句
        /// </summary>
        public IntPtr Handle
        {
            get { return handle; }
            set { handle = value; }
        }

        #endregion

        public Character(IntPtr hWnd)
        {
            this.Handle = hWnd;
        }

        /// <summary>
        /// 更改选择的目标
        /// </summary>
        public void ChangeTarget()
        {
            Game.KeyPress(System.Windows.Forms.Keys.Tab);
        }

        /// <summary>
        /// 普通攻击
        /// </summary>
        public void Attack()
        {
            Game.KeyPress(System.Windows.Forms.Keys.Oemtilde);
        }
    }
}
